package com.jp.knowledge.adapter;

import android.content.Context;
import android.widget.TextView;

import com.jp.knowledge.R;
import com.jp.knowledge.model.HeadLineData;
import com.jp.knowledge.util.TimeUtil;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Locale;

/**
 * Created by 528787067@qq.com on 2017/7/18.
 */

public class PositonKnowledgeAdapter extends SecondLevelCommAdapter {

	private DateFormat dateFormat;

	public PositonKnowledgeAdapter(Context context, List infos, DateFormat dateFormat) {
		super(context, infos);
		this.dateFormat = dateFormat;
	}

	@Override
	protected void renderData(JPRecycleViewHolder holder, Object item, int position) {
		super.renderData(holder, item, position);
		setTextView((TextView) holder.getView(R.id.time),
				dateFormat.format(((HeadLineData) item).getCreatetime()));
	}
}
